<div class="calendar" ng-click="ctrl.preventDefault($event)">
	<div class="calendar-header">
		<span class="calendar-prev iconfont icon-rightarrow" ng-click="ctrl.switchMonth(-1)"></span><select ng-model="ctrl.parts.month"
						ng-options="index as month for (index, month) in ctrl.months"
						ng-change="ctrl.changeMonth()"></select><select ng-model="ctrl.parts.year"
						ng-options="year for year in ctrl.years"
						ng-change="ctrl.changeYear()"></select><span class="calendar-next iconfont icon-rightarrow" ng-click="ctrl.switchMonth(1)"></span>
	</div>

	<ul class="calendar-week-title">
		<li>日</li><li>一</li><li>二</li><li>三</li><li>四</li><li>五</li><li>六</li>
	</ul>

	<ul class="calendar-days">
		<li ng-repeat="date in ctrl.timeRange"
			ng-class="{'calendar-day-other-month': date.otherMonth, 'active': date.active, 'disabled': date.disabled, 'in-range': date.inRange}"
			ng-click="!date.disabled && ctrl.setDate(date)">
			{{date.getDate()}}
		</li>
	</ul>

	<div class="calendar-time" ng-show="!ctrl.dateOnly">
		时间：
		<input class="calendar-time-input"
					 name="hour"
					 ng-model="ctrl.parts.hour"
					 maxlength="2"
					 ng-min="0"
					 ng-max="23"
					 ng-keyup="ctrl.updateTime($event)"
					 ng-blur="ctrl.addTimeZero($event)"> :
		<input class="calendar-time-input"
					 name="minute"
					 ng-model="ctrl.parts.minute"
					 maxlength="2"
					 ng-min="0"
					 ng-max="59"
					 ng-keyup="ctrl.updateTime($event)"
					 ng-blur="ctrl.addTimeZero($event)"> :
		<input class="calendar-time-input"
					 name="second"
					 ng-model="ctrl.parts.second"
					 maxlength="2"
					 ng-min="0"
					 ng-max="59"
					 ng-keyup="ctrl.updateTime($event)"
					 ng-blur="ctrl.addTimeZero($event)">
	</div>

	<div class="calendar-buttons">
		<button class="calendar-button-cancel" type="button" ng-click="ctrl.setNow()">现在</button>
		<button class="calendar-button-ok"
						type="button"
						ng-click="ctrl.confirm()"
						ng-disabled="!ctrl.isValid()">确定</button>
	</div>
</div>
